{# What one meeting came to, drawn the same on the Meetings page and in Overseer's drawer. ``clock`` maps a transcript line's id to its time. #} {% from "components/macros/feedback.html" import empty_state %} {% from "components/macros/layout.html" import badge, chart_dot %} {# Where the bot is with the call, and how long it was in. #} {% macro status_line(status, length) %} {{ badge(status.label, status.tone) }} {% if length %}{{ length }}{% endif %} {% endmacro %} {% macro failure(meeting) %} {% if meeting.failure_reason %}{% endif %} {% endmacro %} {# The notes, or why there are none: the summary, then what the caller puts first (the Meetings page puts my items there), then the lists. A rewrite that failed keeps the notes it had, and says so above them. #} {% macro notes_view(notes, notes_error, clock, empty, voices) %} {% if notes %} {% if notes_error %}{% endif %}

{{ notes.summary }}

{% if caller is defined %}{{ caller() }}{% endif %} {{ notes_lists(notes, clock, voices) }} {% elif notes_error %} {% else %}

{{ empty }}

{% endif %} {% endmacro %} {# A speaker as the theme marks a source (the logs page's dot): their name in text, after a small dot in their color in this meeting (``voices``). #} {% macro speaker(name, voices, attr="data-speaker") -%} {{ chart_dot(voices.get(name, 1)) }}{{ name }} {%- endmacro %} {% macro items(list, empty, clock, voices=None) %} {% if list %} {% else %}

{{ empty }}

{% endif %} {% endmacro %} {% macro heading(label) %}

{{ label }}

{% endmacro %} {# Everyone's action items, the decisions and the open questions. #} {% macro notes_lists(notes, clock, voices) %}
{{ heading("Everyone's") }} {{ items(notes.action_items, "No action items.", clock, voices) }}
{{ heading("Decisions") }} {{ items(notes.decisions, "No decisions.", clock) }}
{{ heading("Open questions") }} {{ items(notes.open_questions, "None left open.", clock) }}
{% endmacro %} {# Who said what: one speaker's lines in a row under their name, each line with its time and its own anchor (an item jumps to it); ``hit``, the line a search opened it at, marked. #} {% macro transcript(turns, clock, voices, hit=None) %} {% if turns %}
    {% for name, rows in turns %}
  1. {{ speaker(name, voices) }} {% for line in rows %}

    {{ clock[line.id] }} {{ line.text }}

    {% endfor %}
  2. {% endfor %}
{% else %} {{ empty_state("Nothing said yet", "Lines appear here as the call's captions write them.") }} {% endif %} {% endmacro %}